package com.ch999.jiujidetect;

import android.app.Application;
import android.content.Context;
import android.support.multidex.MultiDex;

import com.github.mzule.activityrouter.annotation.Modules;
import com.scorpio.mylib.http.MyHttp;
import com.scorpio.mylib.utils.AsynImageUtil;
import com.tencent.bugly.Bugly;
import com.tencent.bugly.crashreport.CrashReport;

/**
 * Created by scorpio on 2016/12/5.
 */
@Modules({"main", "detect"})
public class BaseApplication extends Application {

    private boolean debug;

    @Override
    public void onCreate() {
        super.onCreate();
        debug = BuildConfig.DEBUG;
        MyHttp.inisWithCookie(getApplicationContext(), "https://huishou.9ji.com/app/", ".9ji.com", debug);
        CrashReport.UserStrategy strategy = new CrashReport.UserStrategy(this);

        strategy.setAppChannel(getResources().getString(R.string.bugly_app_chanel));


        AsynImageUtil.init(getApplicationContext());
        Bugly.init(getApplicationContext(), "54b3c6dbf2", false, strategy);
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(base);
    }
}
